widget-factory: Avoid a crash
authorMatthias Clasen <mclasen@redhat.com>
Thu, 5 Jun 2014 22:46:50 +0000 (18:46 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 5 Jun 2014 22:46:50 +0000 (18:46 -0400)
We want to be able to show the dialogs more than once, so just
hide them on delete.

demos/widget-factory/widget-factory.ui

index 1d8a50cd28c08b244b8c067801c86a3d864a581c..579c5b62c4455afd84d14825611d734547c57709 100644 (file)
@@ -2732,6 +2732,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
     <property name="text" translatable="yes">Do something?</property>
     <property name="secondary-text" translatable="yes">If you do something,
 bad things might happen.</property>
+    <signal name="delete-event" handler="gtk_widget_hide_on_delete"/>
     <child type="action">
       <object class="GtkButton" id="cancel_info_dialog">
         <property name="visible">True</property>
@@ -2754,6 +2755,7 @@ bad things might happen.</property>
     <property name="modal">True</property>
     <property name="use-header-bar">1</property>
     <property name="title" translatable="yes">Action</property>
+    <signal name="delete-event" handler="gtk_widget_hide_on_delete"/>
     <child internal-child="vbox">
       <object class="GtkBox">
         <child>
@@ -2789,6 +2791,7 @@ bad things might happen.</property>
     <property name="modal">True</property>
     <property name="use-header-bar">1</property>
     <property name="title" translatable="yes">Properties</property>
+    <signal name="delete-event" handler="gtk_widget_hide_on_delete"/>
     <child internal-child="vbox">
       <object class="GtkBox">
         <child>